using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
using Canvas.Base;
using Canvas.Enum;

namespace Canvas.CanvasInterfaces
{
    public interface IDrawObject
    {
        /// <summary>
        /// Lay Id cua object duoc draw 
        /// </summary>
        string Id { get;}
        /// <summary>
        /// Sao chep ban sao cua chinh doi tuong
        /// </summary>
        /// <returns></returns>
        IDrawObject clone();
        /// <summary>
        /// Kiem tra xem 1 diem co thuoc doi tuong
        /// </summary>
        /// <returns></returns>
        bool PointInObject(ICanvas canvas, UnitPoint point);
        /// <summary>
        /// Kiem tra xem doi tuong co thuoc hinh chu' nhat.
        /// </summary>
        /// <param name="canvas"></param>
        /// <param name="rect"></param>
        /// <param name="anyPoint"></param>
        /// <returns></returns>
        bool ObjectInRectangle(ICanvas canvas, RectangleF rect, bool anyPoint);
        /// <summary>
        /// Lay kich thuoc bao hinh chu nhat
        /// </summary>
        /// <param name="canvas"></param>
        /// <returns></returns>
        RectangleF GetBoundingRect(ICanvas canvas);
        /// <summary>
        /// Su kien Mouse move
        /// </summary>
        /// <param name="canvas"></param>
        /// <param name="point"></param>
        void OnMouseMove(ICanvas canvas, UnitPoint point);
        /// <summary>
        /// Su kien Mouse Up
        /// </summary>
        /// <param name="canvas">Buc ve</param>
        /// <param name="point">diem</param>
        /// <param name="point">diem bat</param>
        void OnMouseUp(ICanvas canvas, UnitPoint point, ISnapPoint snappoint);
        /// <summary>
        /// Su kien Mouse Down
        /// </summary>
        /// <param name="canvas"></param>
        /// <param name="e"></param>
        void OnMouseDown(ICanvas canvas, KeyPressEventArgs e);
        eDrawObjectMouseDown OnMouseDown(ICanvas canvas, UnitPoint point, ISnapPoint snappoint);
        UnitPoint RepeatStartingPoint { get;}
        INodePoint NodePoint(ICanvas canvas, UnitPoint point);
        ISnapPoint SnapPoint(ICanvas canvas, UnitPoint point, List<IDrawObject> otherobj, Type[] runningsnaptypes, Type usersnaptype);
        void Move(UnitPoint offset);
        string GetInfoAsString();
    }
}
